home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-08 | 3.9 KB | 103 lines | [TEXT/GEOL] |
- Item 1098893 7-Oct-93 13:57PDT
-
- From: MSHARP Sharp, Maurice
-
- To: HERRICK1 Herrick, Catherine
-
- ------------------------------------------------------------------------------
-
- Sub: resize link
-
- ©1993 Apple Computer Inc.
- Apple Preliminary-Confidential
-
- Hi folks...
-
- This is a friendly reminder that your applications should be screen-size
- indepenedent. We are looking into products that have industry standard screen
- sizes, such as VGA (640x480) and fractional VGA screens (320x240).
-
- This means you should develop with smaller and larger screen sizes in mind.
- This is supported in the current version of Newton software.
-
- There are 2 main ways to make sure you application works at different screen
- sizes.
-
- 1. Develop and design based on the smallest standard screen (320x240)
-
- 2. Develop and design fully dynamic resizeable apps
-
- Option 2 may seem a bit scary and very difficult at first, but there is support
- in the system to help you do this:
-
- GetAppParams()
-
- This function call returns a frame describing the current device view bounds
- and the location of the buttons. The return frame looks like this:
-
- {appAreaTop: 0,
- appAreaLeft: 0,
- appAreaWidth: 240,
- appAreaHeight: 320,
- buttonBarPosition: 'bottom} // one of 'top, 'bottom, 'left, 'right
-
- You can use this call to set the viewbounds of your base application view
- during at viewSetupFormScript time. The simplest way is to create a function
- that will resize your view for you and call it from you viewSetupFormScript.
- Here is one that will take up the entire screen (leaving space for a frame
- around the base view):
-
- sizeBaseToDisplay
- func()
- func()
- begin
- // assumes a 1 pixel frame and top left parent relative justification
- local b := getAppParams();
- self.viewbounds.top := b.appAreaTop + 2 ;
- self.viewbounds.left := b.appAreaLeft + 2;
- self.viewBounds.bottom := self.viewbounds.top + b.appAreaHeight - 4 ;
- self.viewBounds.right := self.viewbounds.left + b.appAreaWidth - 4;
- end
-
- You may also have the function give you a maximum size as well:
-
- sizeBaseToDisplay
- func()
- begin
- local b := getAppParams();
- self.viewbounds.top := b.appAreaTop + 2 ;
- self.viewbounds.left := b.appAreaLeft + 2;
- // always be no higher than the MessagePad screen
- self.viewBounds.bottom := MIN(self.viewbounds.top + b.appAreaHeight - 4,
- 336) ;
- // always be no wider than the MessagePadScreen
- self.viewBounds.right := MIN(self.viewbounds.left + b.appAreaWidth - 4,
- 340) ;
- end
-
-
- Once your base application view is sized correctly, you can use the viewJustify
- slot to make other parts of your application parent releative or sibling
- relative justified. Not all parts of your application need to be full or center
- justified, some parts will not be affected by a slightly smaller screen size.
-
- Other parts of your application may need to be dynamically constructed (a view
- that has children representing soup entries, like the checkbook).
-
- Your application base view should include a border. That way if your
- application is launched on screen that is larger than the maximum size of your
- application, the user will be able to see it.
-
- WARNING 1: Do not use full justification in your base application view. The
- rootView may be larger than the visible area of the screen.
-
- WARNING 2: Do not rely on upper left global coordinate of your application
- being fixed. On a larger screen it may be possible to move your base
- application around the screen. If you work with global coordinates in your
- application, make sure you check the current location of your base view (send a
- GlobalBox() message to your base view).
-
- If you follow these simple design and develop guidelines, your application
- should work on future Newton products.
-
-